<template>
	<view class="serach">
		<template>
		  <u--input
		    prefixIcon="search"
		    placeholder="请输入内容"
		    border="surround"
		    v-model="value"
			clearable
		    @change="change"
			shape="circle"
		  ></u--input>
		</template>
		<view class="serach-main" v-for="item in houseList" :key="item.id">
			<view class="serach-imgs">
				<img :src="item.imgs" alt="" srcset="" class="imgs">
			</view>
			<view class="serach-text">
				<view class="name">{{item.name}}</view>
				<view class="type-point">{{item.type}}/{{item.point}}</view>
				<view class="tabs">{{item.tabs}}</view>
				<view class="price">{{item.price}}元/平</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import { $_search } from "@/apis/index.js"
	export default {
		data() {
			return {
				value: '',
				houseList:{}
				// area : "天府新区"
				// id : 5
				// imgs :"http://129.211.169.131:6368/imgs/5.jpg"
				// name : "中国铁建西派国樾"
				// point : 168
				// price : 19400
				// range : "华府大道"
				// tabs : "['低公摊','湖景房','精装','新风地暖']"
				// type : "4室2厅"
			};
		},
		onLoad() {
			 
		},
		 methods: {
		    change(e) { 
				$_search({searchkey:e}).then(res=>{
					this.houseList=res.data.data
					console.log(34,this.houseList); 
				})
		    }
		}
	}
</script>

<style lang="scss">
.serach{
	margin: 10px;
	.serach-main{
		display: flex;
		justify-content: flex-start;
		.serach-imgs{
			
			.imgs{
				width: 175rpx;
				height: 175rpx;
			}
		}
		.serach-text{
			margin-left: 50px;
			font-size: 12px;
			.name{
				font-size: 16px;
				font-weight: bold;
			}
			.type-point{
				
			}
			.tabs{
				color: #999;
			}
			.price{
				color: #999;
			}
		}
	}
}
</style>
